//
//  LoginCell.m
//  BakeCenter
//
//  Created by Barnett Wu on 15/9/23.
//  Copyright (c) 2015年 Baked. All rights reserved.
//

#import "LoginCell.h"



@implementation LoginCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.titleLabel = [[UILabel alloc] init];
        self.titleLabel.backgroundColor = [UIColor seashellColor];
        self.titleLabel.font = [UIFont boldSystemFontOfSize:13.0];
        
        
        self.inputTextField = [[UITextField alloc] init];
        self.inputTextField.backgroundColor = [UIColor seashellColor];
        
        [self.contentView addSubview:self.titleLabel];
        [self.contentView addSubview:self.inputTextField];
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.mas_left).offset(45);
            make.width.equalTo(@60);
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-5);
            make.height.equalTo(@30);
        }];
        
        [self.inputTextField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.titleLabel.mas_right).offset(10);
            make.width.equalTo(@200);
            make.top.equalTo(self.titleLabel);
            make.height.equalTo(self.titleLabel);
        }];
    }
    self.inputTextField.delegate = self;
    return self;
}

#pragma mark - 隐藏键盘



//- (BOOL)textFieldShouldReturn:(UITextField *)textField
//{
//    [self.inputTextField resignFirstResponder];
//    NSLog(@"1");
//    return YES;
//}


#pragma mark - 取消点击高亮状态
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated
{
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self endEditing:YES];
}

- (void)awakeFromNib {
}


@end
